package com.supermap.data.modal;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * 角色信息
 * TUser entity. @sun'f
 */
@Entity
@Table(name = "T_ROLE")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class TRole {

    /**
     * 主键
     */
    private String id;
    /**
     * 角色类型
     */
    private int role_type;
    /**
     * 角色名称
     */
    private String role_name;
    /**
     * 角色代码
     */
    private String role_code;

    public TRole() {
    }

    public TRole(String id, int role_type, String role_name, String role_code) {
        this.id = id;
        this.role_type = role_type;
        this.role_name = role_name;
        this.role_code = role_code;
    }

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column(name = "ROLE_TYPE")
    public int getRole_type() {
        return role_type;
    }

    public void setRole_type(int role_type) {
        this.role_type = role_type;
    }

    @Column(name = "ROLE_NAME")
    public String getRole_name() {
        return role_name;
    }

    public void setRole_name(String role_name) {
        this.role_name = role_name;
    }

    @Column(name = "ROLE_CODE")
    public String getRole_code() {
        return role_code;
    }

    public void setRole_code(String role_code) {
        this.role_code = role_code;
    }
}
